Set UB_CLASSPATH in cp-base-java-micro for ub commands#1250
Merged
Krish Vora (KrishVora01) merged 1 commit intomasterfrom Feb 24, 2026
Merged
Set UB_CLASSPATH in cp-base-java-micro for ub commands#1250Krish Vora (KrishVora01) merged 1 commit intomasterfrom
Krish Vora (KrishVora01) merged 1 commit intomasterfrom
Conversation
The ub binary defaults its Java classpath to /usr/share/java/cp-base-java/* but cp-base-java-micro puts JARs in /usr/share/java/cp-base-java-micro/*. This causes KafkaReadyCommand ClassNotFoundException at container startup. Set ENV UB_CLASSPATH to the correct path, matching the pattern already used by cp-base-lite. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot started reviewing on behalf of
Krish Vora (KrishVora01)
February 23, 2026 07:25
View session
There was a problem hiding this comment.
Pull request overview
This PR fixes a critical bug where the ub binary cannot find Java classes in containers built from cp-base-java-micro. The ub tool defaults to /usr/share/java/cp-base-java/* for its classpath, but cp-base-java-micro installs JARs to /usr/share/java/cp-base-java-micro/*, causing ClassNotFoundException errors during container startup (specifically with KafkaReadyCommand).
Changes:
- Sets
ENV UB_CLASSPATH=/usr/share/java/cp-base-java-micro/*in thecp-base-java-microDockerfile to override theubdefault classpath
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Prince Raheja (rahejaprince)
approved these changes
Feb 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ubbinary defaults its Java classpath to/usr/share/java/cp-base-java/*, butcp-base-java-microinstalls JARs to/usr/share/java/cp-base-java-micro/*KafkaReadyCommandClassNotFoundExceptionat container startup for all images built oncp-base-java-microENV UB_CLASSPATH=/usr/share/java/cp-base-java-micro/*in thecp-base-java-microDockerfileTest plan
ub kafka-readyworks in containers built fromcp-base-java-micro